
package ro.qi.framework.sys.media.entities;

import java.util.Date;

import ro.qi.framework.sys.entities.Entity;
import ro.qi.framework.sys.entities.components.ByteArray;

/**
 * @deprecated
 * @author George Pogorelschi
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class Media extends Entity {

	public Media() {
		super();
		setMediaTableName(getTableName());
	}

	public Media(int id) {
		super();
		setMediaTableName(getTableName());
		setId(id);
		select();
	}

	public Media(String name) {
		super();
		setMediaTableName(getTableName());
		setName(name);
		select();
	}

	protected String getTableName() {
		return "";
	}

	public void setMediaTableName(String value) {
		setValue("mediaTableName", value);
	}

	public void setId(int value) {
		setValue("id", value);
	}
	
	public int getId() {
		return getIntValue("id");
	}

	public String getCode() {
		return getStringValue("name");
	}

	public void setCategoryId(int value) {
		setValue("categoryId", value);
	}
	
	public int getCategoryId() {
		return getIntValue("categoryId");
	}

	public void setName(String value) {
		setValue("name", value);
	}

	public String getName() {
		return getStringValue("name");
	}

	public void setDescription(String value) {setValue("description", value);}
	public String getDescription() {return getStringValue("description");}
	public void setFilename(String value) {setValue("filename", value);}
	public String getFilename() {return getStringValue("filename");}
	public void setHeight(int value) {setValue("height", value);}
	public int getHeight() {return getIntValue("height");}
	public void setWidth(int value) {setValue("width", value);}
	public int getWidth() {return getIntValue("width");}
	public void setContentType(String value) {setValue("contentType", value);}
	public String getContentType() {return getStringValue("contentType");}
	public void setContentLength(int value) {setValue("contentLength", value);}
	public int getContentLength() {return getIntValue("contentLength");}
	public void setContent(ByteArray value) {setValue("content", value);}
	public ByteArray getContent() {return (ByteArray)getValue("content");}
	public Date getCreateTime() {return getDateValue("createTime");}
	public Date getUpdateTime() {return getDateValue("updateTime");}

}
